﻿@model MaintenanceModel
@{
    //page title
    ViewBag.Title = T("Admin.System.Maintenance").Text;
}
<div class="section-header">
    <div class="title">
        <img src="@Url.Content("~/Administration/Content/images/ico-system.png")" alt="" />
        @T("Admin.System.Maintenance")
    </div>
    <div class="options">
    </div>
</div>
@using (Html.BeginForm())
{
    <table width="100%">
        <tr>
            <td colspan="2">
                <strong>@T("Admin.System.Maintenance.DeleteGuests")</strong>
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DeleteGuests.StartDate):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.DeleteGuests.StartDate)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DeleteGuests.EndDate):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => Model.DeleteGuests.EndDate)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DeleteGuests.OnlyWithoutShoppingCart):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => Model.DeleteGuests.OnlyWithoutShoppingCart)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" name="delete-guests" class="t-button" value="@T("Admin.Common.Delete")" />
            </td>
        </tr>
        @if (Model.DeleteGuests.NumberOfDeletedCustomers.HasValue)
        {
            <tr>
                <td colspan="2">
                    <strong>@string.Format(T("Admin.System.Maintenance.DeleteGuests.TotalDeleted").Text, Model.DeleteGuests.NumberOfDeletedCustomers.Value)</strong>
                </td>
            </tr>
        }
    </table>
    <p>
        <br />
        <hr />
        <br />
    </p>
    <table width="100%">
        <tr>
            <td colspan="2">
                <strong>@T("Admin.System.Maintenance.DeleteAbandonedCarts")</strong>
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DeleteAbandonedCarts.OlderThan):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.DeleteAbandonedCarts.OlderThan)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" name="delete-abondoned-carts" class="t-button" value="@T("Admin.Common.Delete")" />
            </td>
        </tr>
        @if (Model.DeleteAbandonedCarts.NumberOfDeletedItems.HasValue)
        {
            <tr>
                <td colspan="2">
                    <strong>@string.Format(T("Admin.System.Maintenance.DeleteAbandonedCarts.TotalDeleted").Text, Model.DeleteAbandonedCarts.NumberOfDeletedItems.Value)</strong>
                </td>
            </tr>
        }
    </table>
    <p>
        <br />
        <hr />
        <br />
    </p>
    <table width="100%">
        <tr>
            <td colspan="2">
                <strong>@T("Admin.System.Maintenance.DeleteExportedFiles")</strong>
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DeleteExportedFiles.StartDate):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.DeleteExportedFiles.StartDate)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.NopLabelFor(model => model.DeleteExportedFiles.EndDate):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => Model.DeleteExportedFiles.EndDate)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" name="delete-exported-files" class="t-button" value="@T("Admin.Common.Delete")" />
            </td>
        </tr>
        @if (Model.DeleteExportedFiles.NumberOfDeletedFiles.HasValue)
        {
            <tr>
                <td colspan="2">
                    <strong>@string.Format(T("Admin.System.Maintenance.DeleteExportedFiles.TotalDeleted").Text, Model.DeleteExportedFiles.NumberOfDeletedFiles.Value)</strong>
                </td>
            </tr>
        }
    </table>
}